<?php
//header('content-type:application:json;charset=utf8');
header('Content-type:text/html;charset=utf-8');
header('Access-Control-Allow-Origin:*');  
header('Access-Control-Allow-Methods:POST,GET');
include "./AipOcr.php";


//$imgUrl = "http://mmbiz.qpic.cn/mmbiz_jpg/jLqEzWsicg5JgxtCZoSNJSm2JicThp9Zaria6TRU19SiaSB29PKpIdd0tSEj0mv67LWoBkvpu2cS3J4dPBrpianT2CQ/0";
if(!empty($_REQUEST['img'])){
	$imgUrl = $_REQUEST['img'];
}else{
	echo '';exit;
}


$apiOcr 	= new AipOcr;
$result 	= $apiOcr->basicGeneral($imgUrl);
$res  		= $result['words_result'];
$word 		= '';

if($res){
	foreach($res as $k=>$v){
		$word .= $v['words'];
	}
}

echo $word;
exit;

